﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using FeatureModelCore.FMTypes;

namespace FeatureModelTool.Windows
{
    /// <summary>
    /// Interaction logic for NewRelationshipDialog.xaml
    /// </summary>
    public partial class NewRelationshipDialog : Window
    {
        public bool Dirty { get; protected set; }
        public string FeatureName { get; protected set; }
        public NewRelationshipDialog(string featureName)
        {
            InitializeComponent();
            Dirty = false;

            this.FeatureName = featureName;
        }

        private void okButton_Click(object sender, RoutedEventArgs e)
        {
            if (featureNameTextBox.Text == string.Empty)
            {
                MessageBox.Show("Please enter feature name.");
                return;
            }
            FeatureName = featureNameTextBox.Text;
            Dirty = true;
            this.Close();        
        }
    }
}
